package com.sayai.work.tools.overtimes.data;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "ot_records", schema = "overtimes")
public class OtRecordsEntity {
    private int iid;
    private String idate;
    private String starttime;
    private String endtime;
    private String icontent;
    private String dingding;
    private String forget;
    private String itype;
    private String iusername;

    public OtRecordsEntity(){

    }

    public OtRecordsEntity(String idate,String itype)
    {
        this.idate = idate;
        this.itype = itype;
    }

    @Id
    @Column(name = "iid")
    public int getIid() {
        return iid;
    }

    public void setIid(int iid) {
        this.iid = iid;
    }

    @Basic
    @Column(name = "idate")
    public String getIdate() {
        return idate;
    }

    public void setIdate(String idate) {
        this.idate = idate;
    }

    @Basic
    @Column(name = "starttime")
    public String getStarttime() {
        return starttime;
    }

    public void setStarttime(String starttime) {
        this.starttime = starttime;
    }

    @Basic
    @Column(name = "endtime")
    public String getEndtime() {
        return endtime;
    }

    public void setEndtime(String endtime) {
        this.endtime = endtime;
    }

    @Basic
    @Column(name = "icontent")
    public String getIcontent() {
        return icontent;
    }

    public void setIcontent(String icontent) {
        this.icontent = icontent;
    }

    @Basic
    @Column(name = "dingding")
    public String getDingding() {
        return dingding;
    }

    public void setDingding(String dingding) {
        this.dingding = dingding;
    }

    @Basic
    @Column(name = "forget")
    public String getForget() {
        return forget;
    }

    public void setForget(String forget) {
        this.forget = forget;
    }

    @Basic
    @Column(name = "itype")
    public String getItype() {
        return itype;
    }

    public void setItype(String itype) {
        this.itype = itype;
    }

    @Basic
    @Column(name = "iusername")
    public String getIusername() {
        return iusername;
    }

    public void setIusername(String iusername) {
        this.iusername = iusername;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OtRecordsEntity that = (OtRecordsEntity) o;
        return iid == that.iid &&
                Objects.equals(idate, that.idate) &&
                Objects.equals(starttime, that.starttime) &&
                Objects.equals(endtime, that.endtime) &&
                Objects.equals(icontent, that.icontent) &&
                Objects.equals(dingding, that.dingding) &&
                Objects.equals(forget, that.forget) &&
                Objects.equals(itype, that.itype) &&
                Objects.equals(iusername, that.iusername);
    }

    @Override
    public int hashCode() {
        return Objects.hash(iid, idate, starttime, endtime, icontent, dingding, forget, itype, iusername);
    }
}
